<%@ Page Language="C#" Theme="Defaultsys" AutoEventWireup="true" CodeFile="UserCallDetails.aspx.cs"
    Inherits="UserCallDetails" Title="Rapport Plan System - User call details" MasterPageFile="~/MasterPage.master" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<asp:Content runat="server" ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1">
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td class="contTable">
                <asp:GridView ID="grdUserCalls" SkinID="gvGrid" runat="server" AutoGenerateColumns="false"
                    AllowPaging="true" OnPageIndexChanging="grdUserCalls_PageIndexChanging" Width="100%">
                    <Columns>
                        <asp:TemplateField HeaderText="ID" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <%# Container.DataItemIndex + 1 %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="Contact" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
                            <ItemTemplate>
                                <asp:HyperLink ID="idContact" runat="server" 
                                    NavigateUrl='<%# "Contact.aspx?id="+Global.EncryptString(Eval("ContactId").ToString())%>'>
                                    <%# Eval("Name")%></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:BoundField HeaderText="Name" DataField="Name" SortExpression="Name" 
                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"/>
                        <asp:BoundField HeaderText="Phone" DataField="Phone" SortExpression="Phone"
                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                        <asp:BoundField HeaderText="Mobile Phone" DataField="MobilePhone" SortExpression="MobilePhone" 
                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"/>
                        <asp:BoundField HeaderText="Time left (hours)" DataField="DaysTo" SortExpression="DaysTo" 
                            HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"/>
                    </Columns>
                    <EmptyDataTemplate>
                        There are currently no calls.</EmptyDataTemplate>
                    <PagerStyle VerticalAlign="Middle" HorizontalAlign="Left" Wrap="False" CssClass="paging"
                        Font-Bold="True"></PagerStyle>
                    <PagerSettings Mode="NumericFirstLast" />
                </asp:GridView>
                <asp:Button ID="btnBack" runat="server" Text="Back" OnClick="btnBack_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
